if __name__ == '__main__': parser = argparse.ArgumentParser(description="Run DeepSeek prompt test")
parser.add_argument('--api_key', required=True, help='Your DeepSeek API Key') args = parser.parse_args()
open_api_key = args.api_key model = "deepseek-chat" text = f""" You should express what you want a model to do by\ providing instructions that are as clear and \ specific as you can possibly make them. \ This will guide the model towards the desired output,\ and reduce the chances of receiving irrelevant\ or incorrect responses. Don't confuse writing a \ clear prompt with writing a short prompt.\ In many cases, longer prompts provide more clarity\ and context for the model,which can lead to\ more detailed and relevant outputs. """ prompt = f""" Summarize the text delimited by triple backticks \ into a single. ```{text}``` """
The text emphasizes the importance of providing clear, specific, and detailed instructions to guide a model toward desired outputs, reducing irrelevant or incorrect responses. It notes that clarity is more important than brevity, as longer prompts often offer better context and lead to more relevant results.
if __name__ == '__main__': parser = argparse.ArgumentParser(description="Run DeepSeek prompt test")
parser.add_argument('--api_key', required=True, help='Your DeepSeek API Key') args = parser.parse_args()
open_api_key = args.api_key model = "deepseek-chat" prompt = f""" Generate a list of three made-up book titles along\ with their authors and genres. Provide them in JSON format with the following keys: book_id,title,author,genre. """
text_1 = f""" Making a cup of tea is easy!First, you need to get some\ water boiling. While that's happening,\ grab a cup and put a tea bag in it. Once the water is \ hot enough,just pour it over the tea bag.\ Let it sit for a bit so the tea can steep. After a \ few minutes,take out the tea bag. If you \ like,you can add some sugar or milk to taste.\ And that's it! You've got yourself a delicious \ cuP of tea to enjoy. """ prompt = f""" You will be provided with text delimited by triple quotes. If it contains a sequence of instructions,\ re-write those instructions in the following format: Step 1-…… Step 2-…… Step N-…… If the text does not contain a sequence of instructions,\ then simply write \"No steps provided.\" \"\"\"{text_1}\"\"\" """
Here are the re-written instructions in the requested format:
Step 1 - Get some water boiling. Step 2 - While the water is boiling, grab a cup and put a tea bag in it. Step 3 - Once the water is hot enough, pour it over the tea bag. Step 4 - Let it sit for a bit so the tea can steep. Step 5 - After a few minutes, take out the tea bag. Step 6 - If you like, add some sugar or milk to taste. Step 7 - Enjoy your delicious cup of tea!
text_2 =f""" The sun is shining brightly today,and the birds are\ singing. It's a beautiful day to go for a \ walk in the park. The flovers are blooming,and the\ trees are swaying)gently in the breeze. reople\ are out and aboutr enjoying the lovely weather. \ Some are having picnics,while others are playing\ games or simply relaxing on the grass. It's a \ perfect day to spend time outdoors and appreciate the\ beauty of nature. """ prompt = f""" You will be provided with text delimited by triple quotes. If it contains a sequence of instructions,\ re-write those instructions in the following format: Step 1-…… Step 2-…… Step N-…… If the text does not contain a sequence of instructions,\ then simply write \"No steps provided.\" \"\"\"{text_2}\"\"\" """
我们继续使用上面的输入文本The sun is shining brightly today……,但是我们把指令中的If the text does not contain a sequence of instructions,\ then simply write \"No steps provided.\"删掉。
则大模型输出:
1 2 3 4 5 6
The provided text does not contain any sequence of instructions. It is a descriptive passage about a beautiful day and people enjoying outdoor activities. Therefore, there are no steps to rewrite in the requested format.
Here’s the text for reference: ``` The sun is shining brightly today, and the birds are singing. It's a beautiful day to go for a walk in the park. The flowers are blooming, and the trees are swaying gently in the breeze. People are out and about, enjoying the lovely weather. Some are having picnics, while others are playing games or simply relaxing on the grass. It's a perfect day to spend time outdoors and appreciate the beauty of nature. ```
prompt = f""" Your task is to answer in a consistent style. <child>: Teach me about patience. <grandparent>: The river that carves the deepest\ valley flows from a modest spring; the \ grandest symphony originates from a single note; \ the most intricate tapestry begins with a solitary thread. <child>:Teach me about resilience. """
大模型输出:
1 2
<grandparent>: The bamboo bends with the wind but never breaks, teaching us to yield without surrendering; the diamond is forged under pressure, revealing its strength through adversity; the phoenix rises from ashes, a testament to rebirth after trial.
text= f""" In a charming village, siblings Jack and Jill set out on\ a quest to fetch water from a hilltop\ well.As they climbed,singing joyfully,misfortune \ struck-Jack tripped on a stone and tumbled\ down the hill,with Ji1l following suit.\ Though slightly battered, the pair returned home to \ comforting embraces. Despite the mishap,\ their adventurous spirits remained undimmed, and they\ continued exploring with delight. """ # example 1 prompt_1 = f""" Perform the following actions: 1 - Summarize the following text delimited by triple \ backticks with 1 sentence. 2 - Translate the summary into Chinese. 3 - List each name in the Chinese summary• 4 - Output a json object that contains the following \ keys:chinese_summary,num_names• Separate your answers with line breaks. Text: ```{text}``` """
1 - In a charming village, siblings Jack and Jill embark on a joyful quest to fetch water from a hilltop well, but misfortune strikes when Jack trips and tumbles down the hill, followed by Jill, yet they return home slightly battered but undeterred in their adventurous spirits.
# example 2,asking for output in a specified format prompt_2=f""" Your task is to perform the following actions: 1 - Summarize the following text delimited by <> with 1 sentence. 2 - Translate the summary into Chinese. 3 - List each name in the Chinese summary. 4 - Output a json object that contains the following keys: chinese_summary,num_names. Use the following format: Text: <text to summarize> Summary:<summary> Translation:<summary translation> Names: <list of names in Italian summary> Output JSON: <json with summary and num_names> Text: <{text}> """
我们会得到以下输出:
1 2 3 4 5 6 7 8 9 10
Summary:Jack and Jill went to fetch water from a hilltop well, but both fell down the hill, yet remained adventurous. Translation:杰克和吉尔去山顶的井里打水,但两人都从山上摔了下来,但仍保持着冒险精神。 Names:杰克, 吉尔 Output JSON: ```json { "chinese_summary": "杰克和吉尔去山顶的井里打水,但两人都从山上摔了下来,但仍保持着冒险精神。", "num_names": 2 } ```
prompt_3 = f""" Determine if the student's solution is correct or not. Question: I'm building a solar power installation and I need \ help working out the financials. - Land costs $100 / square foot - I can buy solar panels for $250 / square foot - I negotiated a contract for maintenance that will cost me a flat $100k per year, and an additional $10 / square\ foot What is the total cost for the first year of operations as a function of the number of square feet. Student's Solution: Let x be the size of the installation in square feet. Costs: 1.Land cost: 100x 2. Solar panel cost: 250x 3.Maintenance cost : 100,000 + 100x Total cost: 100x + 250x + 100,000+ 100x = 450x + 100,000 """
prompt_4 = f""" Your task is to determine if the student's solution \ is correct or not. To solve the problem do the following: - First, work out your own solution to the problem. - Then compare your solution to the student's solution \ andevaLuatsyif the student's solution is correct or not. Don't decidefif the student's solution is correct until you have done the problem yourself. Use the following format: Question: ``` question here ``` Student's solution: ``` student's solution here ``` Actual solution: ``` steps to work out the solution and your solution here ``` Is the student's solution the same as actual solution \ just calculated: ``` Yes or no ``` Student grade: ``` correct or incorrect ``` Question: ``` I'm building a solar power installation and I need \ help working out the financials. - Land costs $100 / square foot - I can buy solar panels for $250 / square foot - I negotiated a contract for maintenance that will cost me a flat $100k per year, and an additional $10 / square\ foot What is the total cost for the first year of operations as a function of the number of square feet. ``` Student's Solution: ``` Let x be the size of the installation in square feet. Costs: 1.Land cost: 100x 2. Solar panel cost: 250x 3.Maintenance cost : 100,000 + 100x Total cost: 100x + 250x + 100,000+ 100x = 450x + 100,000 ``` Actual solution: """
``` Let x be the size of the installation in square feet. Costs: 1. Land cost: $100 * x 2. Solar panel cost: $250 * x 3. Maintenance cost: $100,000 + $10 * x Total cost: 100x + 250x + 100,000 + 10x = (100 + 250 + 10)x + 100,000 = 360x + 100,000 ```
Is the student's solution the same as actual solution just calculated: ``` No ``` Student grade: ``` incorrect ```
Let's carefully analyze the student's solution step by step to determine if it's correct. ### Given: 1. **Land costs**: \$100 per square foot → Cost = 100x 2. **Solar panel costs**: \$250 per square foot → Cost = 250x 3. **Maintenance costs**: - Flat \$100,000 per year → Cost = 100,000 - Additional \$10 per square foot → Cost = 10x - **Total maintenance cost**: 100,000 + 10x ### Student's Solution: The student listed the costs as: 1. Land cost: 100x (correct) 2. Solar panel cost: 250x (correct) 3. Maintenance cost: 100,000 + 100x (**incorrect**, should be 100,000 + 10x)
The student then calculated the total cost as: \[ \text{Total cost} = 100x + 250x + 100,000 + 100x = 450x + 100,000 \]
### Error: The mistake isin the **maintenance cost**. The student incorrectly used \$100 per square foot for the variable part of maintenance instead of \$10 per square foot.
### Final Answer: The student's solution is **incorrect**. The correct total cost for the first year of operations as a function of the number of square feet \( x \) is: \[ \text{Total cost} = 360x + 100,000 \]
The **AeroGlide UltraSlim Smart Toothbrush by Boie** is a modern electric toothbrush designed for convenience, portability, and effective cleaning. Here’s what you need to know about it:
### **Key Features:** 1. **Ultra-Slim & Travel-Friendly Design** - Sleek, lightweight, and compact (about the size of a pen), making it easy to carry. - Rechargeable via USB-C, eliminating the need for bulky charging stands.
2. **Smart Sonic Technology** - Uses high-frequency vibrations (sonic technology) for deep cleaning. - Delivers **30,000 brush strokes per minute** to remove plaque effectively.
3. **Replaceable Brush Heads** - Features **Boie’s antimicrobial bristles** (made from medical-grade polymer) that resist bacteria buildup. - Brush heads are **long-lasting** (up to 6 months) and recyclable.
4. **Smart Features (App Connectivity)** - Pairs with a **companion app** (via Bluetooth) to track brushing habits, provide real-time feedback, and ensure optimal cleaning time. - Offers personalized coaching for better oral hygiene.
5. **Gentle on Gums** - The flexible bristles are designed to be gentle on gums while effectively cleaning teeth.
6. **Waterproof & Durable** - IPX7 waterproof rating, making it safe for shower use.
### **Pros:** ✅ **Portable & stylish** – Ideal for travel. ✅ **Long battery life** (~2 weeks per charge). ✅ **Eco-friendly** – Recyclable materials, no plastic waste from replaceable brush heads. ✅ **Smart tracking** – Helps improve brushing habits.
### **Cons:** ❌ **Limited brush head options** (only one type available). ❌ **No pressure sensor** (unlike some premium models like Oral-B or Philips Sonicare). ❌ **App dependency** – Some features require smartphone use.
### **Price & Availability:** - Typically retails for **$80–$100**, depending on promotions. - Sold on **Boie’s website, Amazon, and select retailers**.
### **Who Is It For?** - Frequent travelers who want a compact electric toothbrush. - Tech-savvy users who like smart brushing analytics. - Eco-conscious consumers looking for sustainable dental products.
### **Verdict:** The **AeroGlide UltraSlim Smart Toothbrush** is a great choice if you prioritize portability, smart features, and sustainability. However, if you prefer stronger cleaning modes or pressure sensitivity, high-end models from Oral-B or Sonicare might be better.
Would you like a comparison with other toothbrushes?